package com.chinasofti.properties;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;


public class Demo03 {
    public static void main(String[] args) throws IOException {
        //myStore();
        Properties prop = new Properties();
        FileReader fr = new FileReader("java420\\fw.txt");
        prop.load(fr);
        fr.close();
        System.out.println(prop);
    }

    private static void myStore() throws IOException {
        Properties prop = new Properties();
        prop.put("chinasofti01","赵丽颖");
        prop.put("chinasofti02","赵露丝");
        prop.put("chinasofti03","赵又廷");
        //store(Writer w ,String c)
        FileWriter fw = new FileWriter("java420\\fw.txt");
        prop.store(fw, null);
        fw.close();
    }
}
